Here's the script that creates a bibliography automatically.